package com.yuju.account.enums;

/**
 * 类名：UnitAccountSettleEnum  <br />
 *
 * 功能：
 *
 * @author : jiaokn <br />
 * @Date : 2017年12月7日 下午4:07:06  <br />
 * @version : 1.1 <br />
 */
public enum RefundAccountReturnEnum {
	
	REFUNDACCOUNT_SAVE_SUCCESS("yuju-REFUNDACCOUNT-1001", "新增退款账务成功"),
	REFUNDACCOUNT_SAVE_FAILURE("yuju-REFUNDACCOUNT-1002", "新增退款账务失败"),
	REFUNDACCOUNT_UPDATE_SUCCESS("yuju-REFUNDACCOUNT-1003", "更新退款账务成功"),
	REFUNDACCOUNT_UPDATE_FAILURE("yuju-REFUNDACCOUNT-1004", "更新退款账务失败"),
	REFUNDACCOUNT_LIST_SUCCESS("yuju-REFUNDACCOUNT-1005", "退款账务列表查询成功"),
	REFUNDACCOUNT_LIST_FAILURE("yuju-REFUNDACCOUNT-1006", "退款账务列表查询失败"),
	REFUNDACCOUNT_NOTHING("yuju-REFUNDACCOUNT-1007", "无数据"),
	REFUNDACCOUNT_REDUCE_SUCCESS("yuju-REFUNDACCOUNT-1008", "退款账务删除成功"),
	REFUNDACCOUNT_REDUCE_FAILURE("yuju-REFUNDACCOUNT-1009", "退款账务删除失败");
	
	private String code;
	private String desc;
	
	RefundAccountReturnEnum(String code, String desc) {
		this.code = code;
		this.desc = desc;
	}
	
	public static String getDescByCode(String code) {
		for (RefundAccountReturnEnum enume : RefundAccountReturnEnum.values()) {
			if (enume.getCode().equals(code)) {
				return enume.getDesc();
			}
		}
		
		return "未知枚举类型";
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
}
